home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / thread.arc / THREAD.DOC < prev    next >
Text File  |  1987-05-09  |  13KB  |  309 lines

  1.                                  Thread
  2.                          An On-Line C Help File
  3.  
  4.                              Version 1.01
  5.                           Copyright (c), 1986
  6.                              Fran Horvath
  7.  
  8. Abstract
  9.  
  10.      Thread is a C language help utility.  It was written by a member of
  11.      the U.S.D.A. Grad School faculty to help students learning the C
  12.      language.  Thread is a variable record-length database, together
  13.      with an index, that enables fast look up and display of C keywords,
  14.      standard library functions, and other items.
  15.  
  16. Usage summary
  17.  
  18.      Operation of thread is self explanatory.
  19.  
  20.      -  Simply enter "thread" at the DOS level.
  21.      -  When the menu screen appears, type in the keyword,
  22.            operator, or function desired as shown on the menu.
  23.            Only the first 5 characters are required, but you
  24.            may enter the complete entry if you choose.
  25.      -  If you make a typing error, the item will not be found
  26.            in the search list, and the menu screen will redisplay.
  27.            To correct an error, you may use the function keys
  28.            as in DOS.
  29.  
  30.      For faster reference, you may also use command line arguments at
  31.      the DOS level to look up entries.
  32.  
  33.  
  34. Features
  35.  
  36.      Thread contains two features that are unusual in a help facility.
  37.  
  38.  (1) Thread will accept lookup items from the command line. That is,
  39.      enter:
  40.                          thread precedence
  41.  
  42.      on the command line, and you'll receive a quick screenful of the C
  43.      language precedence table.
  44.  
  45.      Thread will accept more than one item on the command line, and look
  46.      up each in sequence.  In other words, enter:
  47.  
  48.                 thread char short int long float double
  49.  
  50.      and thread will provide a quick survey of C's variable storage
  51.      types. The multiple command line argument feature can be used to
  52.      dissect a line of C code into its major components.  For example,
  53.      enter the line
  54.  
  55.                     thread while (fahr <= upper) {
  56.  
  57.      and thread will show screens of information about the "while"
  58.      keyword, and the the "<=" operator.  The other items will not be
  59.      found in the help file and will be passed over.
  60.  
  61.      Be sure to use a space between keywords and operators if using this
  62.      option.  Thread will not find matches in the line
  63.  
  64.                     thread printf("\nitem",name);
  65.  
  66.      because it will treat the item as a single word argument. (Maybe a
  67.      future version....)
  68.  
  69.  
  70.  (2) At any time, when the help screen is shown, it's possible the help
  71.      item may contain a "thread".  A thread is a related keyword or
  72.      concept that may help clarify the meaning of the current search
  73.      item.
  74.  
  75.      When an item contains a thread, the continuation message at the
  76.      bottom of the screen will read:
  77.  
  78.         Press space to continue, T to follow thread, Esc to quit
  79.  
  80.      Press the 't' key, (upper or lower case accepted), and thread will
  81.      search for the related item immediately and display its help
  82.      screen.
  83.  
  84.      The thread option will not terminate the command line argument
  85.      sequence.  The processing of command line items will resume when
  86.      when you choose to stop threading, or when there are no further
  87.      thread items to follow.
  88.  
  89.  
  90. DOS redirection characters
  91.  
  92.      Since DOS intercepts the characters '|', '<' and '>' for purposes
  93.      of redirecting files, some special handling of these characters had
  94.      to be added.  If the string you are seeking contains one of these
  95.      special characters and you wish to enter it from the command line,
  96.      place double quotes around the argument.  That is:
  97.  
  98.                         thread ">>" void "|"
  99.  
  100.      would look up the >> operator, the word void, and then the |
  101.      operator. No quotes are necessary when using lookup from the main
  102.      menu.
  103.  
  104.  
  105. Processing search items
  106.  
  107.      When you enter a search item at the menu prompt, thread strips all
  108.      blanks from your response.  Entries of:   char,char  , and c h a r
  109.      are all equivalent.
  110.  
  111.      If you make a typing error entering a search item, you can use the
  112.      function keys F1, F2, and F3 together with the backspace, insert,
  113.      and delete keys as in standard DOS command editing.
  114.  
  115.  
  116.  
  117. Exiting thread
  118.  
  119.      After presenting the help screen, thread will prompt for a carriage
  120.      return to return to the menu, possibly a thread item, or the Esc
  121.      key.  Entering  a carriage return will return the user to the main
  122.      menu.   Entering escape will exit the program immediately, and
  123.      leave the help screen on the user's screen.   If you use a editor
  124.      like Sidekick's note facility, you can then see both the upper part
  125.      of the help screen and your own work file.  Seeing the correct
  126.      syntax along with the file you're working on may be useful.
  127.  
  128.      Thread may also be exited by entering a carriage return at the main
  129.      menu prompt.
  130.  
  131.      A Ctrl-Brk at any time will also terminate thread.
  132.  
  133.  
  134. Installation
  135.  
  136.      The easiest way to operate thread is simply to place the three
  137.      files THREAD.EXE, THREAD.DAT, and THREAD.NDX in your current
  138.      working directory.  A good choice for the location of THREAD might
  139.      be the directory that contains your C compiler or interpreter.
  140.  
  141.      THREAD can also be installed on your system so that it can be
  142.      invoked from any current working directory.  To do so, place
  143.      THREAD.EXE in a directory included in your DOS path, or
  144.      change your path to pass through the directory that holds
  145.      THREAD.EXE.
  146.  
  147.      In addition, you need to create a DOS environment variable to
  148.      indicate the directory location of the files THREAD.DAT and
  149.      THREAD.NDX.  To do so, use the DOS SET command to establish a
  150.      variable called THREAD that gives the fully qualified directory
  151.      name of the directory where you have placed THREAD.DAT and
  152.      THREAD.NDX files.
  153.  
  154.      For example, if you had placed all 3 of the THREAD files on a hard
  155.      disk identified as drive C: in a directory named C_HELP, you should
  156.      enter the DOS command:
  157.  
  158.                         SET THREAD=C:\C_HELP
  159.  
  160.      and make sure that your current path includes the C_HELP
  161.      directory.  For example, one path meeting this requirement would
  162.      be:
  163.  
  164.                     PATH=C:\BIN;C:\C3;C:\C_HELP
  165.  
  166.      Another example, for those with ample memory space, is to place the
  167.      files THREAD.DAT and THREAD.NDX on a RAM drive, and to include the
  168.      THREAD.EXE file somewhere in the current path.  The program works
  169.      very quickly in this configuration.  If THREAD.EXE were located in
  170.      C:\BIN, and the DAT and NDX files on a RAM drive identified as D:,
  171.      a sample setup might be:
  172.  
  173.                     PATH=C:\;C:\C3;C:\BIN
  174.                     SET THREAD=D:
  175.  
  176.      The program checks the environment for the THREAD variable before
  177.      it looks in the current working directory.  Thus, if you use the
  178.      SET THREAD option, it will have to be correct, even if the files
  179.      are subsequently moved into the same working directory.  To disable
  180.      the THREAD variable, enter the command
  181.  
  182.                     SET THREAD=
  183.  
  184.      at the DOS level, which will erase the value from the DOS
  185.      environment.
  186.  
  187.      If you use THREAD frequently, you can add the SET and PATH commands
  188.      to your AUTOEXEC.BAT file.  Since the program THREAD.EXE is not
  189.      itself memory resident, it will not conflict with any memory
  190.      resident programs you use.  The order of placement of the SET
  191.      THREAD command within the autoexec file is of no importance.
  192.  
  193.      If you wish, you can rename the .EXE file to a shorter name, or one
  194.      that you find more appropriate.  However, the .DAT and .NDX
  195.      filenames and the environment variable THREAD are hard-coded and
  196.      should not be renamed.
  197.  
  198.  
  199. C_COURSE.BAT
  200.  
  201.      A file named C_COURSE.bat is included with the package.  It is a
  202.      DOS batch file which repeatedly executes thread, with items laid
  203.      out in the order they might be presented in a typical C course.
  204.      The easiest way to use C_COURSE is to continually press the return
  205.      key to step through the entire listing.  The batch file can provide
  206.      a quick summary of C.
  207.  
  208.  
  209. Resist the urge to rewrite the help file
  210.  
  211.      The help file is accessed via the thread.ndx file, which contains
  212.      the offset of the search item in the thread.dat text file.  If you
  213.      are dissatisfied with any of the explanations or examples given in
  214.      the help screens, you may feel a need to access the thread.dat file
  215.      and edit the offending screen.  Please don't.  Any change in the
  216.      thread.dat file will invalidate the thread.ndx file and cause the
  217.      program to search through inappropriate locations in the text file.
  218.  
  219.      If you are dissatisfied with an explanation or example shown,
  220.      please write:
  221.  
  222.                             Fran Horvath
  223.                             2524 N. Key Blvd.
  224.                             Arlington, VA. 22201
  225.  
  226.                         (Compuserve ID 75265,1117 )
  227.  
  228.      with comments or complaints.  Any corrections or changes you would
  229.      like to see made will be considered, and will certainly improve any
  230.      future versions released.
  231.  
  232.  
  233. Acknowledgements
  234.  
  235.      Thread was compiled using Microsoft C, version 3.0.
  236.  
  237.      Thread originated as a homework assignment for adults in USDA's C
  238.      Programming class, ECOMP 275 in the Fall of 1985.  Students were
  239.      asked to write up descriptive screens for individually assigned
  240.      keywords, operators, and functions.  I am grateful to those
  241.      students who participated in the exercise by completing some form
  242.      of usable description.  Those screens formed the core around which
  243.      the program was designed.  In the course of a year, however, every
  244.      screen has been substancially edited or compeletely rewritten, so
  245.      that any resemblance to the originals are purely coincidental.
  246.  
  247.      An assembly screen writing routine was used to speed up screen
  248.      displays.  The original routine was the product of Brian Foley,
  249.      David B. Rein, and Michael D. Most.  The version used here is a
  250.      modified routine which changes end-of-line processing for both
  251.      color and monochrome monitors.
  252.  
  253.      The idea for the index creation routine was suggested by a package
  254.      provided by Philip Mongelluzzo, named BOSS0508.ARC.  The program
  255.      used in connection with this package was a modification of the
  256.      index program presented there. The index generation routine is not
  257.      included with the THREAD package.
  258.  
  259.      I'm grateful to Pete Olympia and Bob Blacher for their reviews and
  260.      comments on a pre-release version of THREAD.
  261.  
  262.      The "K & R" reference at the top right of the display screen refer
  263.      to the book: The C Programming Language, by Brian W. Kernighan and
  264.      Dennis M Ritchie, Prentice Hall Software Series, 1978.  No
  265.      connection with or approval by these authors is implied by the
  266.      reference.  It is included solely for those wishing to find more
  267.      details about a particular concept.
  268.  
  269.      While this program was written for the use by students in USDA
  270.      class ECOMP 275, no approval or authorization by the USDA Grad
  271.      School is implied by this connection.  The author takes sole
  272.      responsibility for content here, and any remaining errors or
  273.      misstatements.
  274.  
  275.  
  276. Revision history
  277.  
  278.      Version
  279.        1.01  11-07-86
  280.              - Shortened required user input to 5 characters
  281.              - Added THREAD environment option
  282.  
  283.  
  284. Copyright and disclaimer
  285.  
  286.      THREAD and this documentation are copyrighted by the author. THREAD
  287.      is intended for PRIVATE, NONCOMMERCIAL USE ONLY.  You may make
  288.      copies of the program and the documentation for your own use, and
  289.      may copy the files for others.  You may not, however, charge for
  290.      such copies, or in any other way sell the program or otherwise
  291.      attempt to make money from it, or any modified version of it.
  292.  
  293.      An institution, professional organization, training program or
  294.      special class conducted for profit may NOT use or distribute THREAD
  295.      as part of its instructional material, unless it submits a one-time
  296.      payment equal to the minimum registration amount required of a
  297.      participant for attending the program.
  298.  
  299.      An exception to the above is granted to RECOGNIZED USER'S GROUPS,
  300.      which are hereby authorized to charge a small amount (not to
  301.      execeed $8.00) for media, postage and handling.
  302.  
  303.      I do not warrant that the program is accurate, or that it operates
  304.      as claimed here.  I will not be liable for any damages of any kind
  305.      sustained through the use of the program, or because of the
  306.      information in the program.  By using the program, you agree to
  307.      these conditions.
  308.  
  309.